package ebiz.buddhist.texts;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class Buddhist extends Activity {

	private Animation anim;
	private ImageView iv;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		
		Window win = getWindow(); 
		win.requestFeature(Window.FEATURE_NO_TITLE); // 타이틀 바 제거
		//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		//AdManager.setAllowUseOfLocation(true);
		//AdManager.setTestDevices(new String[] {AdManager.TEST_EMULATOR, "04037B8408016009"});		
				
		super.onCreate(savedInstanceState);
		setContentView(R.layout.opentitle);
		
		iv = (ImageView) findViewById(R.id.front);
		anim = AnimationUtils.loadAnimation(this, R.anim.opening);
		anim.setAnimationListener(new AnimationListener() {
			
			public void onAnimationStart(Animation animation) {
				// TODO Auto-generated method stub
				
			}
			
			public void onAnimationRepeat(Animation animation) {
				// TODO Auto-generated method stub
				
			}
			
			public void onAnimationEnd(Animation animation) {
				// TODO Auto-generated method stub				
				Destroy();
			}
		});
		iv.startAnimation(anim);		
	}	
	
    private void Destroy(){    	
    //	Intent intent = new Intent(Buddhist.this,Main.class);
    	Intent intent = new Intent(Buddhist.this,Main.class);
		startActivity(intent);
    	finish();
    }
}
